home *** CD-ROM | disk | FTP | other *** search
/ Artworx CD [Amiga] / Artworx CD - Amiga Version (Weird Science) (1995).iso / ecs / computer / gifdecod.lbm (.png) < prev    next >
IFF Interleaved Bitmap Image  |  1992-06-15  |  31KB  |  640x350  |  4-bit (4 colors)
Offensive: Gore: Likely
Labels: text
OCR: GIF Decoder by Bob Montgomery 1-22-87 Notes: 1. nuc = next valid code Init decoder 2. A code is decomposed into a string of colors Get new_code (color) 3. Colors are pushed onto a stack so they can be output last first, which is the order oldcode = color = new_code print(color) the encoder saw them. 4. Init decoder: codesize = bits/pixel + 1 clear_code = 1 << bit/pixel Get new_code end_code = clear_code + 1 code = new__code min_code = end_code + 1 max_code = clear_code << 1 nuc = end_code + 1 Is it the next valid code? code 5. If codesize > 12, Init decoder Envc? code '= old_code push color It was a color , Save new string Is it a code? colorYs = code code>> N push color min_code. shadelnvc] = color child[nvc] = old_code Decompose the code old_code = new_code push shade[code] nuc =, nvc + 1 code = child[code] Send colors to display pop all off stack to output Increase codesize if req'd